"""
找元素值为1的位置
"""
a = [int(i) for i in input().split()]
k = 0
for i in range(len(a)):
    if a[i] == 1:
        k = i + 1
        break
print(k)